package rule02;

/**
 * @author ChangLiang
 * @date 2020/3/16
 */
public class PersonV2 {

    /**
     * 必填 不能使用final
     */
    private String firstName;

    /**
     * 必填
     */
    private String lastName;

    /**
     * 选填
     */
    private String city;

    /**
     * 选填
     */
    private String address;

    /**
     * 选填
     */
    private boolean isMale;

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public void setCity(String city) {
        // 要判断city和address关系是否合法
        this.city = city;
    }

    public void setAddress(String address) {
        // 要判断city和address关系是否合法
        this.address = address;
    }

    public void setMale(boolean male) {
        isMale = male;
    }
}
